<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0px;
				height: 0px;
			}
			.box{
				width: 100vh;
				height: 100vh;
				margin: auto;
			}
			#num{
				font-size: 300px;
				text-align: center;
				line-height: 100vh;
			}
		</style>
	</head>
	<body>
		<div class="box">
			<p id="num">10</p>
		</div>
		
		<script>
			window.onload = function() {
				var oNum = document.getElementById("num");
				var i = 10;
				var timer = null;	
				oNum.onclick = function(){
					setInterval(function() {	
						clearInterval(timer);
						oNum.innerHTML = i;
						i--;
						if(i==0){
							clearTimeout(timer);
							window.location.assign("index.html");							
						}						
					}, 1000)
				}
			}
		</script>
		
	</body>
</html>
